package com.rustic.server.vo;

import cn.hutool.core.bean.BeanUtil;
import com.rustic.server.po.Restaurant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.rustic.server.po.Food;

import java.util.Date;
import java.util.List;

/**
 * 表[food]对应VO类
 *
 * @author auto
 */

@Data
public class FoodVO {

    /**
     * 自增ID
     */
    @ApiModelProperty(value = "自增ID", dataType = "Integer")
    private Integer id;

    /**
     * 关联乡村id
     */
    @ApiModelProperty(value = "关联乡村id", dataType = "int")
    private int rusticId;

    /**
     * 美食名称
     */
    @ApiModelProperty(value = "美食名称", dataType = "String")
    private String name;

    /**
     * 介绍
     */
    @ApiModelProperty(value = "介绍", dataType = "String")
    private String introduce;

    /**
     * 封面
     */
    @ApiModelProperty(value = "封面", dataType = "String")
    private String cover;

    /**
     * 图片(轮播图)
     */
    @ApiModelProperty(value = "图片(轮播图)", dataType = "String")
    private String images;

    /**
     * 分类id
     */
    @ApiModelProperty(value = "分类id", dataType = "int")
    private int categoryId;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序", dataType = "int")
    private int sort;

    /**
     * 推荐餐厅
     */
    @ApiModelProperty(value = "推荐餐厅", dataType = "List")
    private List<Restaurant> restaurantList;

    /**
     * 状态(1发布 2下架)
     */
    @ApiModelProperty(value = "状态(1发布 2下架)", dataType = "int")
    private int status;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人id", dataType = "int")
    private String creator;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人", dataType = "int")
    private String modifier;

    /**
     * 发布时间
     */
    @ApiModelProperty(value = "发布时间", dataType = "Date")
    private Date publishTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间", dataType = "Date")
    private Date updateTime;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", dataType = "Date")
    private Date createTime;

    /**
     * 通用状态(2正常 3删除)
     */
    @ApiModelProperty(value = "通用状态(2正常 3删除)", dataType = "int")
    private int dataStatus;

    public FoodVO(Food food) {
        if (food != null) {
            BeanUtil.copyProperties(food, this);
        }
    }
}
